package com.ghpt.service.impl;
import com.ghpt.mapper.NingQiShiMapper;
import com.ghpt.pojo.NingQiShi;
import com.ghpt.service.NingQiShiService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class NingQiShiServiceImpl implements NingQiShiService{
    @Autowired
    private NingQiShiMapper ningQiShiMapper;

    @Override
    public NingQiShi findNingQiShiById(Long id) {
        if (id != null) {
            return ningQiShiMapper.selectById(id);
        }else {
            return null;
        }
    }
    @Override
    public int updateById(NingQiShi ningQiShi) {
        return ningQiShiMapper.updateById(ningQiShi);//更新成功为1否则为0
    }
}
